﻿using System;
using SharpKit.JavaScript;

namespace SharpKit.Onx
{
    /// <summary>
    /// Encapsulates all URL/browser-related functionality
    /// https://www.onx.ms/#apiPage/browser
    /// </summary>
    [JsType(Mode = JsMode.Prototype, Export = false)]
    public class Browser : Emitter
    {
        //No way to new this up
        private Browser()
        { }

        #region Actions (Methods)
        /// <summary>
        /// Launches an external browser app with the specified URL
        /// </summary>
        /// <param name="url">URL to open in the launched browser app.</param>
        [JsMethod(Name="launch")]
        public void Launch(string url)
        { }

        /// <summary>
        /// Shows an overlay above the active screen.
        /// </summary>
        /// <param name="url">URL to open in the launched browser window.</param>
        [JsMethod(Name = "showOverlay")]
        public void ShowOverlay(string url)
        { }

        /// <summary>
        /// Displays an internal browser popup with the specified URL
        /// </summary>
        /// <param name="url">URL to open in the launched browser window.</param>
        [JsMethod(Name = "showUrl")]
        public void ShowUrl(string url)
        { }

        #endregion
    }
}